package com.ssy.lingxi.common.constant.member;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 角色名称枚举 - 用于S2B功能
 * @author lxc
 * @version 2.0.0
 * @date 2022-03-7
 */
public enum RoleTypeNameEnum {
    /**
     * 上游供应会员 - 1
     */
    UPPER_SUPPLY(1, "上游供应会员"),

    /**
     * 下游销售会员 - 2
     */
    SUB_SALE(2, "下游销售会员");

    /**
     * 枚举类型
     */
    private Integer code;

    /**
     * 枚举值
     */
    private String massage;

    RoleTypeNameEnum(Integer code, String message) {
        this.code = code;
        this.massage = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return LanguageHolder.getName(this.getClass(), this.getCode());
    }

    public String getCHMessage() {
        return this.massage;
    }

    public static String getName(Integer code) {
        return LanguageHolder.getName(RoleTypeNameEnum.class, code);
    }
}
